import {Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn} from 'typeorm';

import {ApiProperty} from "@nestjs/swagger";

@Entity({name:'member'})
export class MemberEntity{

    @PrimaryGeneratedColumn()
    @ApiProperty({description: '主键id'})
    id: number

    @Column()
    @ApiProperty({description: '会员昵称'})
    nickName: string

    @Column()
    @ApiProperty({description: '会员头像'})
    avatar: string

    @Column()
    @ApiProperty({description: '会员手机号'})
    mobile: string

    @Column()
    @ApiProperty({description: '状态：0 禁用 1 启用'})
    status: number

    @Column()
    @ApiProperty({description: '会员邮箱'})
    email: string

    @Column()
    @ApiProperty({description: '密码'})
    password: string

    @Column()
    @ApiProperty({description: '会员等级id'})
    levelId: number

    @Column()
    @ApiProperty({description: '用户积分'})
    integral: number

    @Column()
    @ApiProperty({description: '支付密码'})
    payPassword: string

    @Column()
    @ApiProperty({description: '微信token'})
    wxToken: string

    @CreateDateColumn()
    @ApiProperty({description: '创建时间'})
    createdTime: Date

    @UpdateDateColumn()
    @ApiProperty({description: '更新时间'})
    updatedTime: Date

    @Column()
    @ApiProperty({description: '最后登录时间'})
    lastLoginTime: Date

}